inherited fmInsideRequest: TfmInsideRequest
  Left = 388
  Top = 74
  Width = 1240
  Height = 770
  Caption = #1042#1085#1091#1090#1088#1077#1085#1085#1080#1081' '#1076#1086#1082#1091#1084#1077#1085#1090#1086#1086#1073#1086#1088#1086#1090
  Constraints.MinHeight = 770
  Constraints.MinWidth = 1240
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  inherited sbBottom: TStatusBar
    Top = 705
    Width = 1224
  end
  inherited Panel1: TPanel
    Width = 1224
    Visible = False
    inherited BitBtn1: TBitBtn
      Left = 1062
    end
    inherited BitBtn2: TBitBtn
      Left = 1150
    end
  end
  object ToolBar1: TToolBar [2]
    Left = 0
    Top = 45
    Width = 1224
    Height = 29
    ButtonHeight = 26
    ButtonWidth = 25
    Caption = 'ToolBar1'
    Images = DMInv.ilActive
    TabOrder = 2
    Wrapable = False
    object tbAddIR: TToolButton
      Left = 0
      Top = 2
      Hint = #1057#1086#1079#1076#1072#1090#1100' '#1076#1086#1082#1091#1084#1077#1085#1090
      Caption = 'tbAdd'
      ImageIndex = 28
      ParentShowHint = False
      ShowHint = True
      OnClick = tbAddIRClick
    end
    object tbEditIR: TToolButton
      Left = 25
      Top = 2
      Hint = #1056#1077#1076#1072#1082#1090#1080#1088#1086#1074#1072#1090#1100' '#1076#1086#1082#1091#1084#1077#1085#1090
      Caption = 'tbEditIR'
      ImageIndex = 2
      ParentShowHint = False
      ShowHint = True
      OnClick = tbEditIRClick
    end
    object tbDelIR: TToolButton
      Left = 50
      Top = 2
      Hint = #1059#1076#1072#1083#1080#1090#1100
      Caption = 'tbDelIR'
      ImageIndex = 29
      ParentShowHint = False
      ShowHint = True
      OnClick = tbDelIRClick
    end
    object tbRefresh: TToolButton
      Left = 75
      Top = 2
      Hint = #1055#1088#1086#1074#1077#1088#1080#1090#1100' '#1087#1086#1095#1090#1091
      Caption = 'tbRefresh'
      ImageIndex = 8
      ParentShowHint = False
      ShowHint = True
      OnClick = tbRefreshClick
    end
    object cxLabel1: TcxLabel
      Left = 100
      Top = 6
      Caption = #1044#1072#1090#1072' '#1076#1086#1082'.'
    end
    object eDate: TcxButtonEdit
      Tag = 11
      Left = 156
      Top = 3
      ParentFont = False
      Properties.Buttons = <
        item
          Glyph.Data = {
            F6000000424DF600000000000000760000002800000010000000100000000100
            0400000000008000000000000000000000001000000000000000000000000000
            8000008000000080800080000000800080008080000080808000C0C0C0000000
            FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00FFFFFFFFFFFF
            FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
            FFFFFFFFFFF0FFFFFFFFFFFFFF000FFFFFFFFFFFF00000FFFFFFFFFF0000000F
            FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
            FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF}
        end>
      Properties.MaxLength = 0
      Properties.ReadOnly = True
      Properties.OnButtonClick = eDatePropertiesButtonClick
      Properties.OnChange = eDatePropertiesChange
      Style.Font.Charset = DEFAULT_CHARSET
      Style.Font.Color = clWindowText
      Style.Font.Height = -13
      Style.Font.Name = 'Tahoma'
      Style.Font.Style = [fsBold]
      Style.LookAndFeel.SkinName = ''
      Style.Shadow = False
      Style.IsFontAssigned = True
      StyleDisabled.LookAndFeel.SkinName = ''
      StyleFocused.LookAndFeel.SkinName = ''
      StyleHot.LookAndFeel.SkinName = ''
      TabOrder = 0
      Width = 211
    end
    object cxLabel2: TcxLabel
      Left = 367
      Top = 6
      Caption = #1057#1091#1073#1098#1077#1082#1090
    end
    object cxLookupComboBox1: TcxLookupComboBox
      Left = 415
      Top = 2
      ParentFont = False
      Properties.DropDownRows = 15
      Properties.KeyFieldNames = 'PID'
      Properties.ListColumns = <
        item
          FieldName = 'PP'
        end>
      Properties.ListOptions.ShowHeader = False
      Properties.ListSource = dsEmpl
      Properties.MaxLength = 0
      Properties.OnChange = cxLookupComboBox1PropertiesChange
      Properties.OnCloseUp = cxLookupComboBox1PropertiesCloseUp
      Properties.OnEditValueChanged = cxLookupComboBox1PropertiesEditValueChanged
      Style.Font.Charset = DEFAULT_CHARSET
      Style.Font.Color = clWindowText
      Style.Font.Height = -15
      Style.Font.Name = 'Tahoma'
      Style.Font.Style = []
      Style.Shadow = False
      Style.IsFontAssigned = True
      TabOrder = 1
      Width = 282
    end
    object cxLabel4: TcxLabel
      Left = 697
      Top = 6
      Caption = #1058#1080#1087
    end
    object cbType: TcxComboBox
      Left = 719
      Top = 2
      ParentFont = False
      Properties.Items.Strings = (
        #1042#1089#1077' '#1085#1077#1091#1076#1072#1083'.'
        #1048#1089#1093#1086#1076#1103#1097#1080#1077
        #1042#1093#1086#1076#1103#1097#1080#1077
        #1059#1076#1072#1083#1077#1085)
      Properties.OnChange = eDatePropertiesChange
      Style.Font.Charset = DEFAULT_CHARSET
      Style.Font.Color = clWindowText
      Style.Font.Height = -15
      Style.Font.Name = 'Tahoma'
      Style.Font.Style = []
      Style.IsFontAssigned = True
      TabOrder = 4
      Text = #1042#1089#1077' '#1085#1077#1091#1076#1072#1083'.'
      Width = 121
    end
    object cxLabel3: TcxLabel
      Left = 840
      Top = 6
      Caption = #1057#1090#1072#1090#1091#1089
    end
    object cbStatus: TcxComboBox
      Left = 880
      Top = 2
      ParentFont = False
      Properties.Items.Strings = (
        #1042#1089#1077
        #1053#1077' '#1088#1072#1089#1089#1084#1086#1090#1088#1077#1085#1086
        #1042#1099#1087#1086#1083#1085#1077#1085#1086
        #1054#1090#1082#1072#1079#1072#1085#1086
        #1053#1091#1078#1076'. '#1074' '#1091#1090#1086#1095#1085'.'
        #1042' '#1087#1088#1086#1094#1077#1089#1089#1077' '#1086#1073#1088#1072#1073#1086#1090#1082#1080)
      Properties.OnChange = eDatePropertiesChange
      Style.Font.Charset = DEFAULT_CHARSET
      Style.Font.Color = clWindowText
      Style.Font.Height = -15
      Style.Font.Name = 'Tahoma'
      Style.Font.Style = []
      Style.IsFontAssigned = True
      TabOrder = 7
      Text = #1042#1089#1077
      Width = 140
    end
    object cxLabel5: TcxLabel
      Left = 1020
      Top = 6
      Caption = #1055#1088#1080#1086#1088#1080#1090#1077#1090
    end
    object cbPrioritet: TcxComboBox
      Left = 1079
      Top = 2
      ParentFont = False
      Properties.Items.Strings = (
        #1042#1089#1077
        #1053#1086#1088#1084#1072#1083#1100#1085#1099#1081
        #1054#1095#1077#1085#1100' '#1089#1088#1086#1095#1085#1099#1081)
      Properties.OnChange = eDatePropertiesChange
      Style.Font.Charset = DEFAULT_CHARSET
      Style.Font.Color = clWindowText
      Style.Font.Height = -15
      Style.Font.Name = 'Tahoma'
      Style.Font.Style = []
      Style.IsFontAssigned = True
      TabOrder = 9
      Text = #1042#1089#1077
      Width = 140
    end
  end
  object cxSplitter1: TcxSplitter [3]
    Left = 865
    Top = 74
    Width = 8
    Height = 631
    HotZoneClassName = 'TcxMediaPlayer9Style'
  end
  object Panel2: TPanel [4]
    Left = 873
    Top = 74
    Width = 351
    Height = 631
    Align = alClient
    BevelOuter = bvNone
    TabOrder = 4
    object cxLabel6: TcxLabel
      Left = 0
      Top = 0
      Align = alTop
      Caption = #1050#1086#1084#1084#1077#1085#1090#1072#1088#1080#1080' '#1086' '#1093#1086#1076#1077' '#1074#1099#1087#1086#1083#1085#1077#1085#1080#1103
      ParentFont = False
      Style.Font.Charset = DEFAULT_CHARSET
      Style.Font.Color = clGray
      Style.Font.Height = -16
      Style.Font.Name = 'Tahoma'
      Style.Font.Style = []
      Style.IsFontAssigned = True
    end
    object cxGrid1: TcxGrid
      Left = 0
      Top = 23
      Width = 351
      Height = 608
      Align = alClient
      TabOrder = 1
      LookAndFeel.Kind = lfStandard
      object cxGridDBTableView1: TcxGridDBTableView
        NavigatorButtons.ConfirmDelete = False
        NavigatorButtons.First.Visible = True
        NavigatorButtons.PriorPage.Visible = True
        NavigatorButtons.Prior.Visible = True
        NavigatorButtons.Next.Visible = True
        NavigatorButtons.NextPage.Visible = True
        NavigatorButtons.Last.Visible = True
        NavigatorButtons.Insert.Visible = False
        NavigatorButtons.Append.Visible = False
        NavigatorButtons.Delete.Visible = False
        NavigatorButtons.Edit.Visible = False
        NavigatorButtons.Post.Visible = False
        NavigatorButtons.Cancel.Visible = False
        NavigatorButtons.Refresh.Visible = False
        NavigatorButtons.SaveBookmark.Visible = False
        NavigatorButtons.GotoBookmark.Visible = False
        NavigatorButtons.Filter.Visible = False
        DataController.DataSource = dsIRComments
        DataController.Summary.DefaultGroupSummaryItems = <>
        DataController.Summary.FooterSummaryItems = <
          item
            Format = '#,###0'
            Kind = skSum
            FieldName = 'BALANCE'
            DisplayText = #1054#1073#1097'. '#1089#1091#1084#1084#1072
          end
          item
            Format = '#,###0'
            Kind = skSum
            FieldName = 'DEBET'
          end
          item
            Format = '#,###0'
            Kind = skSum
            FieldName = 'KREDIT'
          end>
        DataController.Summary.SummaryGroups = <>
        DataController.Summary.Options = [soNullIgnore]
        FilterRow.InfoText = #1065#1077#1083#1082#1085#1080#1090#1077' '#1079#1076#1077#1089#1100' '#1076#1083#1103' '#1089#1086#1079#1076#1072#1085#1080#1103' '#1092#1080#1083#1100#1090#1088#1072
        NewItemRow.InfoText = #1065#1105#1083#1082#1085#1080#1090#1077' '#1079#1076#1077#1089#1100' '#1076#1083#1103' '#1076#1086#1073#1072#1074#1083#1077#1085#1080#1103' '#1085#1086#1074#1086#1081' '#1089#1090#1088#1086#1082#1080
        OptionsBehavior.CellHints = True
        OptionsBehavior.IncSearch = True
        OptionsData.CancelOnExit = False
        OptionsData.Deleting = False
        OptionsData.DeletingConfirmation = False
        OptionsData.Inserting = False
        OptionsSelection.HideFocusRectOnExit = False
        OptionsSelection.InvertSelect = False
        OptionsSelection.UnselectFocusedRecordOnExit = False
        OptionsView.NavigatorOffset = 10
        OptionsView.NoDataToDisplayInfoText = '<'#1053#1077#1090' '#1076#1072#1085#1085#1099#1093'>'
        OptionsView.ColumnAutoWidth = True
        OptionsView.DataRowHeight = 24
        OptionsView.ExpandButtonsForEmptyDetails = False
        OptionsView.Footer = True
        OptionsView.GroupByBox = False
        OptionsView.Indicator = True
        Preview.Visible = True
        Styles.Content = DMInv.cxData
        Styles.IncSearch = DMInv.cxKrasniyText
        Styles.Selection = DMInv.cxJoltiyFon
        Styles.Header = DMInv.cxSiniyText
        object tvIRIRTIME: TcxGridDBColumn
          Caption = #1042#1088#1077#1084#1103' '#1089#1086#1079#1076#1072#1085#1080#1103
          DataBinding.FieldName = 'IRTIME'
          Options.Editing = False
          Width = 92
        end
        object tvIRIRCOMMENT: TcxGridDBColumn
          Caption = #1050#1086#1084#1084#1077#1085#1090#1072#1088#1080#1081
          DataBinding.FieldName = 'IRCOMMENT'
          Options.Filtering = False
          Width = 286
        end
      end
      object cxGridLevel1: TcxGridLevel
        GridView = cxGridDBTableView1
      end
    end
  end
  object Panel3: TPanel [5]
    Left = 0
    Top = 74
    Width = 865
    Height = 631
    Align = alLeft
    Caption = 'Panel3'
    TabOrder = 5
    object dbgIR: TcxGrid
      Left = 1
      Top = 1
      Width = 863
      Height = 540
      Align = alClient
      TabOrder = 0
      LookAndFeel.Kind = lfStandard
      object tvIR: TcxGridDBTableView
        NavigatorButtons.ConfirmDelete = False
        NavigatorButtons.First.Visible = True
        NavigatorButtons.PriorPage.Visible = True
        NavigatorButtons.Prior.Visible = True
        NavigatorButtons.Next.Visible = True
        NavigatorButtons.NextPage.Visible = True
        NavigatorButtons.Last.Visible = True
        NavigatorButtons.Insert.Visible = False
        NavigatorButtons.Append.Visible = False
        NavigatorButtons.Delete.Visible = False
        NavigatorButtons.Edit.Visible = False
        NavigatorButtons.Post.Visible = False
        NavigatorButtons.Cancel.Visible = False
        NavigatorButtons.Refresh.Visible = False
        NavigatorButtons.SaveBookmark.Visible = False
        NavigatorButtons.GotoBookmark.Visible = False
        NavigatorButtons.Filter.Visible = False
        OnCellDblClick = tvIRCellDblClick
        OnCustomDrawCell = tvIRCustomDrawCell
        DataController.DataSource = dlgDS
        DataController.Summary.DefaultGroupSummaryItems = <>
        DataController.Summary.FooterSummaryItems = <
          item
            Format = '#,###0'
            Kind = skSum
            FieldName = 'BALANCE'
            DisplayText = #1054#1073#1097'. '#1089#1091#1084#1084#1072
          end
          item
            Format = '#,###0'
            Kind = skSum
            FieldName = 'DEBET'
          end
          item
            Format = '#,###0'
            Kind = skSum
            FieldName = 'KREDIT'
          end>
        DataController.Summary.SummaryGroups = <>
        DataController.Summary.Options = [soNullIgnore]
        FilterRow.InfoText = #1065#1077#1083#1082#1085#1080#1090#1077' '#1079#1076#1077#1089#1100' '#1076#1083#1103' '#1089#1086#1079#1076#1072#1085#1080#1103' '#1092#1080#1083#1100#1090#1088#1072
        NewItemRow.InfoText = #1065#1105#1083#1082#1085#1080#1090#1077' '#1079#1076#1077#1089#1100' '#1076#1083#1103' '#1076#1086#1073#1072#1074#1083#1077#1085#1080#1103' '#1085#1086#1074#1086#1081' '#1089#1090#1088#1086#1082#1080
        OptionsBehavior.CellHints = True
        OptionsBehavior.ImmediateEditor = False
        OptionsBehavior.IncSearch = True
        OptionsCustomize.ColumnFiltering = False
        OptionsData.CancelOnExit = False
        OptionsData.Deleting = False
        OptionsData.DeletingConfirmation = False
        OptionsData.Editing = False
        OptionsData.Inserting = False
        OptionsSelection.CellSelect = False
        OptionsSelection.HideFocusRectOnExit = False
        OptionsSelection.InvertSelect = False
        OptionsSelection.UnselectFocusedRecordOnExit = False
        OptionsView.NavigatorOffset = 10
        OptionsView.NoDataToDisplayInfoText = '<'#1053#1077#1090' '#1076#1072#1085#1085#1099#1093'>'
        OptionsView.ColumnAutoWidth = True
        OptionsView.DataRowHeight = 24
        OptionsView.ExpandButtonsForEmptyDetails = False
        OptionsView.Footer = True
        OptionsView.Indicator = True
        Preview.Visible = True
        Styles.Content = DMInv.cxData
        Styles.IncSearch = DMInv.cxKrasniyText
        Styles.Selection = DMInv.cxJoltiyFon
        Styles.Header = DMInv.cxSiniyText
        object tvIRIRID1: TcxGridDBColumn
          Caption = 'ID'
          DataBinding.FieldName = 'IRID'
        end
        object tvIRIR_ISNEW: TcxGridDBColumn
          DataBinding.FieldName = 'IR_ISNEW'
          PropertiesClassName = 'TcxImageComboBoxProperties'
          Properties.Alignment.Horz = taCenter
          Properties.Alignment.Vert = taVCenter
          Properties.Images = DMInv.cxSmallImages
          Properties.Items = <
            item
              ImageIndex = 61
            end
            item
              ImageIndex = 62
              Value = 1
            end>
          Properties.ReadOnly = True
          Width = 35
          IsCaptionAssigned = True
        end
        object tvIRFIO_AUTOR: TcxGridDBColumn
          Caption = #1054#1090' '#1082#1086#1075#1086
          DataBinding.FieldName = 'FIO_AUTOR'
          Width = 89
        end
        object tvIRFIO_TARGET: TcxGridDBColumn
          Caption = #1050#1086#1084#1091
          DataBinding.FieldName = 'FIO_TARGET'
          Width = 63
        end
        object tvIRIRTEMA: TcxGridDBColumn
          Caption = #1058#1077#1084#1072
          DataBinding.FieldName = 'IRTEMA'
          Width = 58
        end
        object tvIRTIP: TcxGridDBColumn
          Caption = #1058#1080#1087
          DataBinding.FieldName = 'TIP'
          Width = 47
        end
        object tvIRSTATUS: TcxGridDBColumn
          Caption = #1057#1090#1072#1090#1091#1089
          DataBinding.FieldName = 'STATUS'
          Width = 85
        end
        object tvIRIRSTATUSNOTE: TcxGridDBColumn
          Caption = #1050#1086#1084'. '#1082' '#1089#1090#1072#1090#1091#1089#1091
          DataBinding.FieldName = 'IRSTATUSNOTE'
          PropertiesClassName = 'TcxMemoProperties'
          Width = 158
        end
        object tvIRIRUSERENTER: TcxGridDBColumn
          Caption = #1040#1074#1090#1086#1088
          DataBinding.FieldName = 'IRUSERENTER'
          Width = 72
        end
        object tvIRIRTIMEENTER: TcxGridDBColumn
          Caption = #1057#1086#1079#1076#1072#1085#1086
          DataBinding.FieldName = 'IRTIMEENTER'
          Width = 96
        end
        object tvIRIRUSEREDIT: TcxGridDBColumn
          Caption = #1056#1077#1076#1072#1082#1090#1086#1088
          DataBinding.FieldName = 'IRUSEREDIT'
          Width = 110
        end
        object tvIRIRTIMEEDIT: TcxGridDBColumn
          Caption = #1054#1090#1088#1077#1076#1072#1082#1090#1080#1088#1086#1074#1072#1085#1086
          DataBinding.FieldName = 'IRTIMEEDIT'
          Width = 146
        end
        object tvIRIRDATECOMPLETE: TcxGridDBColumn
          Caption = #1042#1099#1087#1086#1083#1085#1080#1090#1100' '#1076#1086
          DataBinding.FieldName = 'IRDATECOMPLETE'
          Width = 115
        end
        object tvIRPRIORITET: TcxGridDBColumn
          Caption = #1055#1088#1080#1086#1088#1080#1090#1077#1090
          DataBinding.FieldName = 'PRIORITET'
          Width = 115
        end
        object tvIRIRSTATUS: TcxGridDBColumn
          DataBinding.FieldName = 'IRSTATUS'
          Visible = False
        end
        object tvIROUTOFDATE: TcxGridDBColumn
          DataBinding.FieldName = 'OUTOFDATE'
          Visible = False
        end
      end
      object dbgIRLevel1: TcxGridLevel
        GridView = tvIR
      end
    end
    object cxMemo1: TcxMemo
      Left = 1
      Top = 541
      Align = alBottom
      Lines.Strings = (
        'cxMemo1')
      Properties.ScrollBars = ssVertical
      TabOrder = 1
      Visible = False
      Height = 89
      Width = 863
    end
  end
  inherited dlgDS: TDataSource
    DataSet = qIR
  end
  object dsEmpl: TDataSource
    DataSet = qEmpl
    Left = 584
    Top = 14
  end
  object qEmpl: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    DataSource = dlgDS
    SQL.Strings = (
      
        'SELECT DISTINCT P.PID, (COALESCE(P.PLASTNAME,'#39' '#39')||'#39' '#39'||COALESCE' +
        '(P.PNAME,'#39' '#39')||'#39' '#39'||COALESCE(P.PPATRONYMIC,'#39' '#39')) AS PP'
      'FROM PEOPLE P'
      'INNER JOIN DOLJNOST_PEOPLE d ON d.PID = P.PID'
      'INNER JOIN DOLJNOST D1 ON d1.DOLID = d.DOLID'
      ''
      'WHERE P.PISDELETE IS NULL AND d.DOLISDELETE IS NULL'
      ''
      'ORDER BY 2')
    Left = 616
    Top = 14
    object qEmplPID: TIntegerField
      FieldName = 'PID'
      Origin = '"PEOPLE"."PID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qEmplPP: TIBStringField
      FieldName = 'PP'
      ProviderFlags = []
      Size = 767
    end
  end
  object qIR: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    AfterInsert = qIRAfterInsert
    CachedUpdates = True
    SQL.Strings = (
      
        'SELECT (COALESCE(P1.PLASTNAME,'#39' '#39')||'#39' '#39'||COALESCE(P1.PNAME,'#39' '#39')|' +
        '|'#39' '#39'||COALESCE(P1.PPATRONYMIC,'#39' '#39')) AS fio_autor,'
      
        '(COALESCE(P2.PLASTNAME,'#39' '#39')||'#39' '#39'||COALESCE(P2.PNAME,'#39' '#39')||'#39' '#39'||C' +
        'OALESCE(P2.PPATRONYMIC,'#39' '#39')) AS fio_target,'
      'IIF(IR.PID IN (:PID1, :PID2), '#39#1048#1089#1093'.'#39', '#39#1042#1093#1086#1076'.'#39') AS tip,'
      'IR.*,'
      'CASE'
      'WHEN IR.IRSTATUS IS NULL THEN '#39#1053#1077' '#1088#1072#1089#1089#1084#1086#1090#1088#1077#1085#1086#39
      'WHEN IR.IRSTATUS = 1 THEN '#39#1042#1099#1087#1086#1083#1085#1077#1085#1086#39
      'WHEN IR.IRSTATUS = 2 THEN '#39#1054#1090#1082#1072#1079#1072#1085#1086#39
      'WHEN IR.IRSTATUS = 3 THEN '#39#1053#1091#1078#1076#1072#1077#1090#1089#1103' '#1074' '#1091#1090#1086#1095#1085#1077#1085#1080#1080#39
      'WHEN IR.IRSTATUS = 4 THEN '#39#1042' '#1087#1088#1086#1094#1077#1089#1089#1077' '#1086#1073#1088#1072#1073#1086#1090#1082#1080#39
      'END AS status,'
      'case'
      'WHEN ir.IRPRIORITET = 1 THEN '#39#1053#1086#1088#1084#1072#1083#1100#1085#1099#1081#39
      'WHEN ir.IRPRIORITET = 2 THEN '#39#1054#1095'. '#1089#1088#1086#1095#1085#1099#1081#39
      'END AS prioritet,'
      'IIF(CURRENT_DATE <= IR.IRDATECOMPLETE, 0, 1) AS outofdate'
      'FROM INSIDE_REQUEST IR'
      'INNER JOIN PEOPLE P1 ON P1.PID = IR.PID'
      'INNER JOIN PEOPLE P2 ON P2.PID = IR.PID_TARGET'
      'WHERE  CAST(ir.IRTIMEENTER AS DATE) BETWEEN :data1 AND :data2')
    UpdateObject = quIR
    GeneratorField.Field = 'IRID'
    GeneratorField.Generator = 'GEN_INSIDE_REQUEST_ID'
    Left = 304
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'PID1'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'PID2'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'data1'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'data2'
        ParamType = ptUnknown
      end>
    object qIRFIO_AUTOR: TIBStringField
      FieldName = 'FIO_AUTOR'
      ProviderFlags = []
      Size = 767
    end
    object qIRFIO_TARGET: TIBStringField
      FieldName = 'FIO_TARGET'
      ProviderFlags = []
      Size = 767
    end
    object qIRTIP: TIBStringField
      FieldName = 'TIP'
      ProviderFlags = []
      FixedChar = True
      Size = 5
    end
    object qIRIRID: TIntegerField
      FieldName = 'IRID'
      Origin = '"INSIDE_REQUEST"."IRID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qIRPID: TIntegerField
      FieldName = 'PID'
      Origin = '"INSIDE_REQUEST"."PID"'
    end
    object qIRPID_TARGET: TIntegerField
      FieldName = 'PID_TARGET'
      Origin = '"INSIDE_REQUEST"."PID_TARGET"'
    end
    object qIRIRTEMA: TIBStringField
      FieldName = 'IRTEMA'
      Origin = '"INSIDE_REQUEST"."IRTEMA"'
      Size = 2048
    end
    object qIRIRSTATUS: TIntegerField
      FieldName = 'IRSTATUS'
      Origin = '"INSIDE_REQUEST"."IRSTATUS"'
    end
    object qIRIRSTATUSNOTE: TIBStringField
      FieldName = 'IRSTATUSNOTE'
      Origin = '"INSIDE_REQUEST"."IRSTATUSNOTE"'
      Size = 2048
    end
    object qIRIRUSERENTER: TIBStringField
      FieldName = 'IRUSERENTER'
      Origin = '"INSIDE_REQUEST"."IRUSERENTER"'
      Size = 40
    end
    object qIRIRTIMEENTER: TDateTimeField
      FieldName = 'IRTIMEENTER'
      Origin = '"INSIDE_REQUEST"."IRTIMEENTER"'
    end
    object qIRIRUSEREDIT: TIBStringField
      FieldName = 'IRUSEREDIT'
      Origin = '"INSIDE_REQUEST"."IRUSEREDIT"'
      Size = 40
    end
    object qIRIRTIMEEDIT: TDateTimeField
      FieldName = 'IRTIMEEDIT'
      Origin = '"INSIDE_REQUEST"."IRTIMEEDIT"'
    end
    object qIRIRISDELETE: TIntegerField
      FieldName = 'IRISDELETE'
      Origin = '"INSIDE_REQUEST"."IRISDELETE"'
    end
    object qIRIRRTF: TBlobField
      FieldName = 'IRRTF'
      Origin = '"INSIDE_REQUEST"."IRRTF"'
      ProviderFlags = [pfInUpdate]
      Size = 8
    end
    object qIRIR_ISNEW: TIntegerField
      FieldName = 'IR_ISNEW'
      Origin = '"INSIDE_REQUEST"."IR_ISNEW"'
    end
    object qIRIRDATECOMPLETE: TDateField
      FieldName = 'IRDATECOMPLETE'
      Origin = '"INSIDE_REQUEST"."IRDATECOMPLETE"'
    end
    object qIRIRPRIORITET: TIntegerField
      FieldName = 'IRPRIORITET'
      Origin = '"INSIDE_REQUEST"."IRPRIORITET"'
    end
    object qIRPRIORITET: TIBStringField
      FieldName = 'PRIORITET'
      ProviderFlags = []
      FixedChar = True
      Size = 11
    end
    object qIRSTATUS: TIBStringField
      FieldName = 'STATUS'
      ProviderFlags = []
      FixedChar = True
      Size = 21
    end
    object qIROUTOFDATE: TIntegerField
      FieldName = 'OUTOFDATE'
      ProviderFlags = []
    end
  end
  object quIR: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      '  FIO_AUTOR,'
      '  FIO_TARGET,'
      '  TIP,'
      '  IRID,'
      '  PID,'
      '  PID_TARGET,'
      '  IRTEMA,'
      '  IRSTATUS,'
      '  IRSTATUSNOTE,'
      '  IRUSERENTER,'
      '  IRTIMEENTER,'
      '  IRUSEREDIT,'
      '  IRTIMEEDIT,'
      '  IRISDELETE,'
      '  IRRTF,'
      '  IR_ISNEW,'
      '  IRDATECOMPLETE,'
      '  IRPRIORITET,'
      '  STATUS'
      'from INSIDE_REQUEST '
      'where'
      '  IRID = :IRID')
    ModifySQL.Strings = (
      'update INSIDE_REQUEST'
      'set'
      '  IR_ISNEW = :IR_ISNEW,'
      '  IRDATECOMPLETE = :IRDATECOMPLETE,'
      '  IRID = :IRID,'
      '  IRISDELETE = :IRISDELETE,'
      '  IRPRIORITET = :IRPRIORITET,'
      '  IRRTF = :IRRTF,'
      '  IRSTATUS = :IRSTATUS,'
      '  IRSTATUSNOTE = :IRSTATUSNOTE,'
      '  IRTEMA = :IRTEMA,'
      '  PID = :PID,'
      '  PID_TARGET = :PID_TARGET'
      'where'
      '  IRID = :OLD_IRID')
    InsertSQL.Strings = (
      'insert into INSIDE_REQUEST'
      
        '  (IR_ISNEW, IRDATECOMPLETE, IRID, IRISDELETE, IRPRIORITET, IRRT' +
        'F, IRSTATUS, '
      '   IRSTATUSNOTE, IRTEMA, PID, PID_TARGET)'
      'values'
      
        '  (:IR_ISNEW, :IRDATECOMPLETE, :IRID, :IRISDELETE, :IRPRIORITET,' +
        ' :IRRTF, '
      '   :IRSTATUS, :IRSTATUSNOTE, :IRTEMA, :PID, :PID_TARGET)')
    DeleteSQL.Strings = (
      'update INSIDE_REQUEST'
      'set'
      '  IRisdelete = 1'
      'where'
      '  IRID = :OLD_IRID')
    Left = 344
  end
  object qIR_tmp: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      
        'SELECT (COALESCE(P1.PLASTNAME,'#39' '#39')||'#39' '#39'||COALESCE(P1.PNAME,'#39' '#39')|' +
        '|'#39' '#39'||COALESCE(P1.PPATRONYMIC,'#39' '#39')) AS fio_autor,'
      
        '(COALESCE(P2.PLASTNAME,'#39' '#39')||'#39' '#39'||COALESCE(P2.PNAME,'#39' '#39')||'#39' '#39'||C' +
        'OALESCE(P2.PPATRONYMIC,'#39' '#39')) AS fio_target,'
      'IIF(IR.PID IN (:PID1, :PID2), '#39#1048#1089#1093'.'#39', '#39#1042#1093#1086#1076'.'#39') AS tip,'
      'IR.*,'
      'CASE'
      'WHEN IR.IRSTATUS IS NULL THEN '#39#1053#1077' '#1088#1072#1089#1089#1084#1086#1090#1088#1077#1085#1086#39
      'WHEN IR.IRSTATUS = 1 THEN '#39#1042#1099#1087#1086#1083#1085#1077#1085#1086#39
      'WHEN IR.IRSTATUS = 2 THEN '#39#1054#1090#1082#1072#1079#1072#1085#1086#39
      'WHEN IR.IRSTATUS = 3 THEN '#39#1053#1091#1078#1076#1072#1077#1090#1089#1103' '#1074' '#1091#1090#1086#1095#1085#1077#1085#1080#1080#39
      'WHEN IR.IRSTATUS = 4 THEN '#39#1042' '#1087#1088#1086#1094#1077#1089#1089#1077' '#1086#1073#1088#1072#1073#1086#1090#1082#1080#39
      'END AS status,'
      'case'
      'WHEN ir.IRPRIORITET = 1 THEN '#39#1053#1086#1088#1084#1072#1083#1100#1085#1099#1081#39
      'WHEN ir.IRPRIORITET = 2 THEN '#39#1054#1095'. '#1089#1088#1086#1095#1085#1099#1081#39
      'END AS prioritet,'
      'IIF(CURRENT_DATE <= IR.IRDATECOMPLETE, 0, 1) AS outofdate'
      'FROM INSIDE_REQUEST IR'
      'INNER JOIN PEOPLE P1 ON P1.PID = IR.PID'
      'INNER JOIN PEOPLE P2 ON P2.PID = IR.PID_TARGET'
      'WHERE  CAST(ir.IRTIMEENTER AS DATE) BETWEEN :data1 AND :data2')
    GeneratorField.Field = 'IRID'
    Left = 304
    Top = 40
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'PID1'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'PID2'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'data1'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'data2'
        ParamType = ptUnknown
      end>
  end
  object dsIRComments: TDataSource
    DataSet = qIRComments
    Left = 577
    Top = 206
  end
  object qIRComments: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    DataSource = dlgDS
    SQL.Strings = (
      'SELECT IRC.*'
      'FROM IR_COMMENTS IRC'
      'WHERE IRC.IRID = :IRID')
    GeneratorField.Field = 'IRCID'
    GeneratorField.Generator = 'GEN_IR_COMMENTS_ID'
    Left = 616
    Top = 206
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'IRID'
        ParamType = ptUnknown
      end>
    object qIRCommentsIRCID: TIntegerField
      FieldName = 'IRCID'
      Origin = '"IR_COMMENTS"."IRCID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qIRCommentsIRID: TIntegerField
      FieldName = 'IRID'
      Origin = '"IR_COMMENTS"."IRID"'
    end
    object qIRCommentsIRTIME: TDateTimeField
      FieldName = 'IRTIME'
      Origin = '"IR_COMMENTS"."IRTIME"'
    end
    object qIRCommentsIRCOMMENT: TIBStringField
      FieldName = 'IRCOMMENT'
      Origin = '"IR_COMMENTS"."IRCOMMENT"'
      Size = 2048
    end
  end
  object cxPropertiesStore1: TcxPropertiesStore
    Components = <>
    StorageName = 'Software\Olympic_PS_fmInsideRequest'
    StorageType = stRegistry
    Left = 480
    Top = 112
  end
end
